package com.lagou.zuoyes1m3;

import java.util.*;

public class DouDiZhu {

    public static void main(String[] args) {

        String[] num = {"3","4","5","6","7","8","9","10","J","Q","K","A","2"};
        String[] color = {"♠","♣","♦","♥"};

        List<String> list = new ArrayList<>();
        List<String> list1 = new ArrayList<>();
        List<String> list2 = new ArrayList<>();
        List<String> list3 = new ArrayList<>();
        List<String> list4 = new ArrayList<>();

        for (int i = 0; i < color.length; i++) {
            for (int j = 0; j < num.length; j++) {
                list.add(color[i] + num[j]);
            }
        }

        list.add("大王");
        list.add("小王");

        Collections.shuffle(list);
        //System.out.println(list);

        for (int i = 0; i < list.size(); i++) {
            if (i >= 51) {
                list4.add(list.get(i));
                continue;
            }else if (i % 3 == 0) {
                list1.add(list.get(i));
            }else if (i % 3 == 1) {
                list2.add(list.get(i));
            }else {
                list3.add(list.get(i));
            }

        }

        System.out.println("玩家1" + list1);
        System.out.println("玩家2" + list2);
        System.out.println("玩家3" + list3);
        System.out.println("底牌" + list4);

    }
}
